<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>捐赠详情</title>
    <link rel="stylesheet" type="text/css" href="__CSS__api.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__aui.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__dropload.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__common.css" />

    <style>
        .aui-bar-nav .aui-iconfont {
            position: relative;
            font-family: "aui_iconfont" !important;
            font-size: 0.75rem;
            color: #E73C5C;
            font-style: normal;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            height: 2.4rem;

        }

        .aui-bar-nav {
            background-color: #fff;
        }

        .aui-icon-tu {
            height: 2.4rem;
            width: 49px;
            background: url('__IMG__left.png') no-repeat 0.5rem center;
            background-size: 22px 22px;
        }

        .aui-bar-nav .aui-pull-right {
            padding-right: 0.75rem;
        }

        .aui-bar-nav .aui-title {
            font-size: 0.9rem;
            color: #333333;
            font-weight: 500;
        }
        .nav{
            background-color: #fff;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .font{
            height: 2rem;
            flex: 1;
            font-size:0.8rem;
            color:#333333;
            line-height:2rem;
            text-align: center;
        }

        /*tab*/
        .aui-tab-item.aui-active {
            color: #E73C5C;
            font-weight: bold;
            font-size: 0.8rem;
            position: relative;
            border: 0;
        }

        .aui-active:after {
            content: '';
            display: block;
            height: 0px;
            width: 100%;
            border-top: 2px solid #E73C5C;
            bottom: 0px;
            left: 0;
            position: absolute;
        }

        .sss {
            margin: 0px 15px;
            width: 100%;
        }

        .aui-tab-item {
            height: 2.4rem;
            line-height: 2.4rem;
            font-size: 0.8rem;
            color: #333;
        }

        .aui-icon-rightu1 {
            height: 2.4rem;
            width: 41px;
            background: url('__IMG__download.png') no-repeat 0.6rem center;
            background-size: 22px 22px;
        }
        .aui-icon-rightu2 {
            height: 2.4rem;
            width: 45px;
            background: url('__IMG__fenxiang.png') no-repeat 0.6rem center;
            background-size: 22px 22px;
        }
        body{
            background-color: #FBF9F7;
        }
        .aui-bar-nav .aui-iconfont {
            position: relative;
            font-family: "aui_iconfont" !important;
            font-size: 0.75rem;
            color: #E73C5C;
            font-style: normal;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            height: 2.4rem;
        }

        .aui-bar-nav {
            background-color: #F2F2F2;
        }

        .aui-icon-tu {
            height: 2.4rem;
            width: 46px;
            background: url('__IMG__left.png') no-repeat 0.5rem center;
            background-size: 16px 16px;
        }

        .aui-bar-nav .aui-title {
            font-size: 0.9rem;
            color: #000000;
            font-weight: bold;
        }

        .aui-icon-rightu {
            height: 2.4rem;
            width: 49px;
            background: url('__IMG__dian.png') no-repeat 0.6rem center;
            background-size: 22px 22px;
        }
        .warrp{
            width: 100%;
            height: 100%;
            padding: 0 0.75rem 0 0.75rem;
            background-color: #FFFFFF;
        }
        .user{
            width: 100%;
            height: 3.25rem;
            display: flex;
            align-items: center;
            justify-content: space-between;

        }
        .font1{
            font-size: 0.8rem;
            color: #333333;
            line-height: 1.1rem;
        }
        .tu{
            font-size:0.7rem;
            line-height:0.6rem;
            color: #999999;
        }
    </style>
</head>
<body>
<div class="l_box"  id="loading2"><img src="__IMG__loading.gif" alt="" id="loading"></div>

<header class="aui-bar aui-bar-nav underLine" style="padding-top:25px;background-color:#FFFFFF;position:;top:0;left:0;z-index:10000;" id="header">
    <a class="aui-pull-left" tapmode="active" onclick="history.go(-1)"> <span class="aui-iconfont aui-icon-tu"> </span> </a>
    <div class="aui-title" style="font-size0.8rem;font-weight:bold">公益历程</div>
    <!--<a class="aui-pull-right " id="right" >-->
        <!--<span class="aui-iconfont aui-icon-rightu1" tapmode="active" onclick="right()"></span>-->
        <!--<span class="aui-iconfont aui-icon-rightu2" tapmode="active" onclick="right()"></span>-->
    <!--</a>-->
</header>
<div class="aui-tab bar underLine" id="tab1">
    <div class="underLine sss aui-tab" id="tab">
        <div class="aui-tab-item" onclick="openmybooklist();">我的证书</div>
        <div class="aui-tab-item aui-active">荣誉证书</div>
    </div>
</div>
<div class="upOrDown">
    <div class="upOrDown_data">
        <div class="warrp" style="margin-top:0.25rem">
        <!--<div class="user underLine" onclick="opendownload()">-->
            <!--<div class="font1">-->
                <!--证书标题-->
            <!--</div>-->
            <!--<div class="tu">-->
                <!--2017-12-33-->
            <!--</div>-->
        <!--</div>-->
        <!--<div class="user underLine" onclick="opendownload()">-->
            <!--<div class="font1">-->
                <!--证书标题-->
            <!--</div>-->
            <!--<div class="tu">-->
                <!--2017-12-33-->
            <!--</div>-->
        <!--</div>-->
    </div>
    </div>
</div>
<div class="toast-wrap">
    <span class="toast-msg"></span>
</div>
</body>
<script type="text/javascript" src="__JS__jquery.min.js"></script>
<script type="text/javascript" src="__JS__layer_mobile/layer.js"></script>
<script type="text/javascript" src="__JS__dropload.min.js"></script>
<script type="text/javascript" src="__JS__api.js"></script>
<script type="text/javascript" src="__JS__tt.js"></script>
<script type="text/javascript" src="__JS__common.js"></script>
<script type="text/javascript">
    function openmybooklist(){
        window.location.href='{:url("my/gongyilicheng")}';
    }
    var page = 0;
    /**
     * 上拉加载，下拉刷新
     */
    var dropload = $('.upOrDown').dropload({
        scrollArea : window,
        autoLoad : true,
//        domUp : {
//            domClass   : 'dropload-up',
//            domRefresh : '<div class="dropload-refresh">↓下拉刷新-自定义内容</div>',
//            domUpdate  : '<div class="dropload-update">↑释放更新-自定义内容</div>',
//            domLoad    : '<div class="dropload-load"><span class="loading"></span>加载中-自定义内容...</div>'
//        },
//        domDown : {
//            domClass   : 'dropload-down',
//            domRefresh : '<div class="dropload-refresh">刷新</div>',
//            domLoad    : '<div class="dropload-load"><span class="loading"></span>加载中...</div>',
//            domNoData  : '<div class="dropload-noData">无数据</div>'
//        },
        loadDownFn : function(me){
            console.log('page='+page);
            page++;
            $.ajax({
                url:'{:url("my/myhonor")}',
                data:'page='+page,//
                type:'POST',
                dataType:'JSON',
                success: function(data){
                    console.log(data);
                    var arrLen = data.data.length;
                    if(arrLen<=0){
                        me.lock();
//                         无数据
                        me.noData(true);
                        // 每次数据加载完，必须重置
                        me.resetload();
                    }else{
                        var datas = data.data;
                        getlist_xiala(datas);

                        // 每次数据加载完，必须重置
                        me.resetload();
                    }


                },
                error: function(xhr, type){
                    alert('Ajax error!');
                    // 即使加载出错，也得重置
                    me.resetload();
                }
            });
        },
        loadUpFn : function(me){
            // var keyword = $('input[name="cate_id"]').val();

            page = 1;
            $.ajax({
                url:'{:url("my/myhonor")}',
                data:'page='+page,
                type:'POST',
                dataType:'json',
                success: function(data){
                    $('.warrp').empty();//
                    var datas = data.data;
                    getlist_xiala(datas);

                    me.resetload();
                    me.unlock();
                    me.noData(false);
                },
                error: function(xhr, type){
                    me.resetload();
                }
            });
        }
    });

//    数据列表化
    function getlist_xiala(data) {
        var html=''
        for (var i=0;i<data.length;i++) {
            html+='<div class="user underLine" onclick="opendetail('+data[i].welfare_id+')">'
            html+='<div class="font1">'+data[i].welfare_title+'</div>';
            html+='<div class="tu">'+data[i].create_time+'</div>';
            html+='</div>';
        }
        $('.warrp').append(html);
    }
    function opendetail(id) {
        window.location.href='{:url("my/gongyilicheng_detail")}?welfare_id='+id;
    }
</script>

</html>
